<?php
require 'include/library.inc.php';
	

head("Study English abroad and search ESL schools and courses - ESL Traveler","Search over 100 ESL (English as a Second Language) programs, enroll in TOEFL preparation or study Business English in the United States, the United Kingdom and Canada.",1);
?>
	
    	<div id="content">
        	
            <h1>Study English abroad</h1>
            
            <p>It's easier than you think. Here is how it works:</p>
            
            <div style="float:left; width:100%;">
                <div class="box">
                    <h3>1. <b class="red">Search</b> by location or course</h3>
                    <span>Search over 100 ESL (English as a Second Language) programs, enroll in TOEFL preparation or study Business English in the United States, the United Kingdom or Canada. Get professional advice from our friendly student's advisors.</span>
                </div>
                
                <div class="box">
                    <h3>2. <b class="red">Submit</b> your application</h3>
                    <span>By booking with ESL Traveler, you are applying directly to the school of your choice with no agent involvement and no costly processing fees. You will receive confirmation from your school within a few hours.</span>
                </div>
                
                <div class="box" style="margin:10px 0 0 0;">
                    <h3>3. <b class="red">Get ready</b> for your adventure</h3>
                    <span>Experience new cultures and places around the world with ESL Traveler, find like-minded people and make new friends while you are studying abroad.</span>
                </div>
            </div>
                        
        </div>
		
		<?php /* ?>
		<div class="panel" style="background-image:url(images/ipad.jpg); background-repeat:no-repeat; background-position:bottom center">
			
			<h2>Leave-A-Review Contest</h2>
			
			<div style="float:left; width:60%; height:150px;">
				<br>
				<h5>1. <b class="red">Find</b> your school</h5><br>
			
				<h5>2. <b class="red">Leave</b> your review to enter</h5><br>
			
				<h5>3. <b class="red">Win</b> great price from ESL Traveler</h5><br>
			</div>
			
			
			<div style="float:right; width:26%;">
				
				<?php 
				$hour  = 0;     // Hour of the day
				$day   = 1;     // Day of the countdown
				$month = 8;      // Month of the countdown
				$year  = 2013;   // Year of the countdown
				
				$calculation = ((mktime ($hour,0,0,$month,$day,$year) - time())/3600);
				$hours = (int)$calculation;
				$days  = (int)($hours/24);				
				?>
				<?php if ($days > 0) { ?>
				<span style="font-size:100px; line-height:70px; float:left; width:100%; margin-top:40px;"><?=$days?></span> days left to enter
				<?php } else { ?>
				<br><br>
				<h3>Contest Concluded! <br>
				Winners to be posted soon...</h3>
				<?php } ?>
				
			</div>
			
		</div>
		
		<?php */?>
        
      	<div class="full left">
        
            <div id="featured">
            <h2>Featured Schools</h2>
                <div class="images">
                <?php
                $sql = "SELECT
                            i.filename,
                            s.school_id,
                            s.name,
                            s.sef_url
                        FROM
                            schools AS s LEFT JOIN images AS i ON i.school_id = s.school_id
                        WHERE
                            s.featured
                        GROUP BY 
                            s.school_id
                        ORDER BY
                            s.order_number DESC
                        LIMIT
                            3
                          ";
                        $result = query($sql);
						$i=0;
                        while ($row_featured = mysql_fetch_object($result)) {	  
                            
                            echo '<a class="image" style="'.(($i==2)?'margin:0;':'').'background-image:url(uploads/img/'.$row_featured->filename.')" title="'.$row_featured->name.'" href="school/'.$row_featured->sef_url.'"><span>'.$row_featured->name.'</span></a>';
							
                            $i++;
							
                        }
                ?>
                </div>
            </div>
                
            <div class="right" style="height:250px">
            	<h2>Search</h2>
                
                <div class="padding">
                	<?php include_once 'searchform.php' ?>
                </div>
            	
            </div>
        </div>
        
        <div class="panel">
        <?php
        $sql = "SELECT
					logo,
					name,
					sef_url
				FROM
					schools
				WHERE
					featured
				ORDER BY
                    RAND()
				LIMIT
					5
				  ";
				$result = query($sql);
				while ($row_logo = mysql_fetch_object($result)) {	  
					
					echo '<a class="schlogo" title="'.$row_logo->name.'" href="school/'.$row_logo->sef_url.'"><img src="uploads/logos/'.$row_logo->logo.'" alt="'.$row_logo->name.'" /></a>';
					
				}
		?>
        </div>
        
        <div class="panel">
        	
            <div class="box doit">
            	<h3>Do it Yourself</h3>
                <span>Your application goes directly to the school. Avoid costly agent processing fee.</span>
            </div>
            
            <div class="box bestprice">
            	<h3>Best Price Guaranteed</h3>
                <span>We offer you the lowest course rates. Same as you will pay at the school.</span>
            </div>
            
            <div class="box secure">
            	<h3>Secure online payment</h3>
                <span>We have SSL-certificate, which ensure your personal information is secure.</span>
            </div>
            
            <div class="box support">
            	<h3>Exceptional Support 24/7</h3>
                <span>We help you with course selection, visas, housing, travel arrangement and airport pickup!</span>
            </div>
            
        </div>
    
<?php foot(); ?>